package com.vmove.childtrain.domain;

import java.util.Objects;

/**
 * lightId与步骤码结合判断是否是同一个亮灯步骤
 */
public class IdStepColor extends IdAndStep{
    byte color;

    public IdStepColor(int lightId, int stepNum) {
        super(lightId, stepNum);
    }

    public IdStepColor(int lightId, int stepNum,byte color) {
        super(lightId, stepNum);
        this.color = color;
    }

    public byte getColor() {
        return color;
    }

    public void setColor(byte color) {
        this.color = color;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        IdStepColor that = (IdStepColor) o;
        return lightId == that.lightId &&
                stepNum == that.stepNum;
    }

    @Override
    public int hashCode() {
        return Objects.hash(lightId, stepNum);
    }

}
